﻿<local:ItemForm x:Class="WpfApp1.Views.Suppliers.Profit.SuppliersProfitItem"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1.Views"
        mc:Ignorable="d"
        ResizeMode="NoResize"
        Icon="\Resources\wb.ico"
        Height="198" Width="330">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="51*"/>
            <ColumnDefinition Width="35*"/>
            <ColumnDefinition Width="251*"/>
            <ColumnDefinition Width="31*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Grid.ColumnSpan="4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="90"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Label Grid.Column="0" Grid.Row="0" Content="Id" VerticalAlignment="Center"/>
            <TextBox x:Name="tbId" 
                     Width="200"
                     Grid.Column="1"
                     Grid.Row="0"
                     HorizontalAlignment="Left"
                     Margin="0 5" 
                     IsReadOnly="True"
                     Text="{Binding CurrentItem.Id}" 
                     Style="{StaticResource CommonTextBox}" />
            
            <Label Grid.Column="0" Grid.Row="1" Content="Поставщик" VerticalAlignment="Center"/>
            <TextBox x:Name="tbTitle" 
                     Width="200"
                     Grid.Column="1"
                     Grid.Row="1"
                     HorizontalAlignment="Left"
                     Margin="0 5" 
                     IsReadOnly="True"
                     Text="{Binding CurrentItem.Title}" 
                     Style="{StaticResource CommonTextBox}" />

            <TextBlock Margin="5 0" Grid.Column="0" Grid.Row="2" Text="Прибыль" VerticalAlignment="Center"/>
            <TextBox x:Name="tbProfit" 
                     Width="200"
                     Grid.Column="1"
                     Grid.Row="2"
                     HorizontalAlignment="Left"
                     Margin="0 5" 
                     IsReadOnly="True"
                     Text="{Binding CurrentItem.Profit}" 
                     Style="{StaticResource CommonTextBox}" />
        </Grid>
        <DockPanel Grid.Row="1"  Margin="10,10,10,10" Grid.ColumnSpan="4">
            <Button x:Name="btnClose" Margin="10 0" Width="90" HorizontalAlignment="Right" Template="{StaticResource commonButton}" Click="btnClose_Click">Закрыть</Button>
        </DockPanel>
    </Grid>
</local:ItemForm>
